<%@ page import="java.sql.*"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Purchase Summary</title>
<style type="text/css">
<!--
.style3 {
	font-family: Arial;
	font-size: 12px;
}
-->
</style>
</head>
<body>
<table width="100%" border="0" cellpadding="0" cellspacing="0" bordercolorlight="#EEEEEE">
<%
dLoop=0;
Rs = task.discount_daily_basis.fetchGradeDiscountList();
Rs.beforeFirst();
if (Rs.next()==true)
{
Rs.beforeFirst();
while (Rs.next())
{
%>
        <tr id=<%=Rs.getInt("id")%> onDblClick="CView_T(this);" onClick="highlightOn(this);">
          <td width="6%" align="center" class="style3"><%=Rs.getInt("id")%></td>
          <td width="10%" align="center" class="style3"><%=task.getFieldValueForId("origin_master","name",Rs.getInt("origin_id"))%></td>
          <td width="7%" align="center" class="style3"><%=task.getFieldValueForId("quality_master","name",Rs.getInt("quality_id"))%></td>
          <td width="21%" align="center" class="style3"><%=Rs.getString("name")%></td>
          <td width="2%" align="center" class="style3"><%=Utils.numberToStr(Rs.getFloat("black_discount"),2)%></td>
          <td width="2%" align="center" class="style3"><%=Utils.numberToStr(Rs.getFloat("black_allowance"),2)%></td>
          <td width="2%" align="center" class="style3"><%=Utils.numberToStr(Rs.getFloat("broken_discount"),2)%></td>
          <td width="2%" align="center" class="style3"><%=Utils.numberToStr(Rs.getFloat("broken_allowance"),2)%></td>
          <td width="2%" align="center" class="style3"><%=Utils.numberToStr(Rs.getFloat("blk_brk_discount"),2)%></td>
          <td width="2%" align="center" class="style3"><%=Utils.numberToStr(Rs.getFloat("blk_brk_allowance"),2)%></td>
          <td width="2%" align="center" class="style3"><%=Utils.numberToStr(Rs.getFloat("brown_discount"),2)%></td>
          <td width="2%" align="center" class="style3"><%=Utils.numberToStr(Rs.getFloat("brown_allowance"),2)%></td>
          <td width="2%" align="center" class="style3"><%=Utils.numberToStr(Rs.getFloat("excelsa_discount"),2)%></td>
          <td width="2%" align="center" class="style3"><%=Utils.numberToStr(Rs.getFloat("excelsa_allowance"),2)%></td>
          <td width="2%" align="center" class="style3"><%=Utils.numberToStr(Rs.getFloat("moldy_discount"),2)%></td>
          <td width="2%" align="center" class="style3"><%=Utils.numberToStr(Rs.getFloat("moldy_allowance"),2)%></td>
          <td width="2%" align="center" class="style3"><%=Utils.numberToStr(Rs.getFloat("foreign_matter_discount"),2)%></td>
          <td width="2%" align="center" class="style3"><%=Utils.numberToStr(Rs.getFloat("foreign_matter_allowance"),2)%></td>
          <td width="2%" align="center" class="style3"><%=Utils.numberToStr(Rs.getFloat("moisture_discount"),2)%></td>
          <td width="2%" align="center" class="style3"><%=Utils.numberToStr(Rs.getFloat("moisture_allowance"),2)%></td>
          <td width="2%" align="center" class="style3"><%=Utils.numberToStr(Rs.getFloat("sc18_discount"),2)%></td>
          <td width="2%" align="center" class="style3"><%=Utils.numberToStr(Rs.getFloat("sc18_allowance"),2)%></td>
          <td width="2%" align="center" class="style3"><%=Utils.numberToStr(Rs.getFloat("sc16_discount"),2)%></td>
          <td width="2%" align="center" class="style3"><%=Utils.numberToStr(Rs.getFloat("sc16_allowance"),2)%></td>
          <td width="2%" align="center" class="style3"><%=Utils.numberToStr(Rs.getFloat("sc14_discount"),2)%></td>
          <td width="2%" align="center" class="style3"><%=Utils.numberToStr(Rs.getFloat("sc14_allowance"),2)%></td>
          <td width="2%" align="center" class="style3"><%=Utils.numberToStr(Rs.getFloat("sc13_discount"),2)%></td>
          <td width="2%" align="center" class="style3"><%=Utils.numberToStr(Rs.getFloat("sc13_allowance"),2)%></td>
          <td width="2%" align="center" class="style3"><%=Utils.numberToStr(Rs.getFloat("sc12_discount"),2)%></td>
          <td width="2%" align="center" class="style3"><%=Utils.numberToStr(Rs.getFloat("sc12_allowance"),2)%></td>
          <td width="2%" align="center" class="style3"><%=Utils.numberToStr(Rs.getFloat("below_sc12_discount"),2)%></td>
          <td width="2%" align="center" class="style3"><%=Utils.numberToStr(Rs.getFloat("below_sc12_allowance"),2)%></td>		  
        </tr>
<%
		dLoop=dLoop+1;
}
}
else
{
%>
        <tr onDblClick="CView_T(this);" onClick="highlightOn(this);">
          <td width="6%" align="center" class="style3">&nbsp;</td>
          <td width="10%" align="center" class="style3">&nbsp;</td>
          <td width="7%" align="center" class="style3">&nbsp;</td>
          <td width="21%" align="center" class="style3">&nbsp;</td>
          <td align="center" class="style3">&nbsp;</td>
          <td align="center" class="style3">&nbsp;</td>
          <td align="center" class="style3">&nbsp;</td>
          <td align="center" class="style3">&nbsp;</td>
          <td align="center" class="style3">&nbsp;</td>
          <td align="center" class="style3">&nbsp;</td>
          <td align="center" class="style3">&nbsp;</td>
          <td align="center" class="style3">&nbsp;</td>
          <td align="center" class="style3">&nbsp;</td>
          <td align="center" class="style3">&nbsp;</td>
          <td align="center" class="style3">&nbsp;</td>
          <td align="center" class="style3">&nbsp;</td>
          <td align="center" class="style3">&nbsp;</td>
          <td align="center" class="style3">&nbsp;</td>
          <td align="center" class="style3">&nbsp;</td>
          <td align="center" class="style3">&nbsp;</td>
          <td align="center" class="style3">&nbsp;</td>
          <td align="center" class="style3">&nbsp;</td>
          <td align="center" class="style3">&nbsp;</td>
          <td align="center" class="style3">&nbsp;</td>
          <td align="center" class="style3">&nbsp;</td>
          <td align="center" class="style3">&nbsp;</td>
          <td align="center" class="style3">&nbsp;</td>
          <td align="center" class="style3">&nbsp;</td>
          <td align="center" class="style3">&nbsp;</td>
          <td align="center" class="style3">&nbsp;</td>
          <td align="center" class="style3">&nbsp;</td>
          <td align="center" class="style3">&nbsp;</td>		  
        </tr>
<%
}
%>
</table>
</body>
</html>
